<template>
  <el-row :gutter="30" class="panel-group" >
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col" >
      <div class="card-panel" @click="goToBookDetail">
        <div class="card-panel-icon-wrapper icon-people">
          <i class="iconfont icon-shujia card-panel-icon"></i>
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">上架书籍</div>
          <p>快速上架，一扫即听</p>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="goToTemplateBuild">
        <div class="card-panel-icon-wrapper icon-message">
          <i class="iconfont icon-lunbotuzujian1 card-panel-icon"></i>
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">轮播</div>
          <p>设置店铺主页轮播</p>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="goToTemplateBuild">
        <div class="card-panel-icon-wrapper icon-money">
          <i class="iconfont icon-fenlei card-panel-icon"></i>
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">分类</div>
          <p>创建分类，填充内容</p>
        </div>
      </div>
    </el-col>
    <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
      <div class="card-panel" @click="goToTemplateSelect">
        <div class="card-panel-icon-wrapper icon-shopping">
          <i class="iconfont icon-listpress card-panel-icon"></i>
        </div>
        <div class="card-panel-description">
          <div class="card-panel-text">列表</div>
          <p>选择主页展示列表</p>
        </div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
  import { mapGetters } from 'vuex'
export default {
  components: {},
  props:{

  },
  computed: {
    ...mapGetters([
      'publishing',
    ])
  },
  methods: {
    goToTemplateBuild() {
      this.$router.push({path:'/publish/templateBuild',query:{id:this.publishing.templateId}});
    },
    goToBookDetail() {
      this.$router.push({name: 'BookDetail'});
    },
    goToTemplateSelect() {
      this.$router.push({name: 'TemplateSelect'});
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
.panel-group {
  margin-top: 18px;
  .card-panel-col{
    margin-bottom: 32px;
  }
  .card-panel {
    height: 108px;
    cursor: pointer;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    color: #333;
    /*display: flex;
    justify-content: space-between;*/
    background: #F7F8F9;
    border-radius: 10px;
    .icon-people {
      background: #FE725F;
    }
    .icon-message {
      background: #4DBFE5;
    }
    .icon-money {
      background: #F4CE16;
    }
    .icon-shopping {
      background: #41C0C2;
    }
    .card-panel-icon-wrapper {
      margin: 15px 0 0 20px;
      padding: 12px 14px;
      transition: all 0.38s ease-out;
      border-radius: 6px;
      color: #fff;
      float: left;
      margin-right: 20px;
    }
    .card-panel-icon {
      float: left;
      font-size: 48px;
    }
    .card-panel-description {
      margin:20px 10px 0 26px;
      margin-left: 0px;
      text-align: left;
      height: auto;
      overflow: hidden;
      display:block;
      .card-panel-text {
        color:#333;
        font-size: 24px;
        margin-bottom:10px;
      }
      p{
      	font-weight: normal;
      	color: #999;
      	font-size: 14px;

      }
      .card-panel-num {
        font-size: 20px;
      }
    }
  }
}
</style>
